Ext.define('TS.model.inv.InventoryModel', {
    extend: 'Ext.data.Model', 
    fields: ['id','invAddId','productId','batchNoId','fyear',
    'period', 'beginQty','beginAmt','inQty','inAmt',
    'outQty', 'outAmt','costPrice','waitInQty',
    'waitOutQty', 'state','remainQty','remainAmt','usableQty'
    ],
    associations: [{
		 type:'hasOne',
		 model: 'TS.model.base.ProductModel', 
		 associatedName : 'product', 	     
		 associationKey:'product'  
       },
       {
		 type:'hasOne',
		 model: 'TS.model.base.InvAddModel', 
		 associatedName : 'inventoryAdd', 	     
		 associationKey:'inventoryAdd'  
       },
       {
		 type:'hasOne',
		 model: 'TS.model.inv.ProductBatchNoModel', 
		 associatedName : 'batchNo', 	     
		 associationKey:'batchNo'  
       }
	]
});



/*	private Long id;
	private Integer invAddId;
	private Integer productId;
	private Long batchNoId;
	private Integer fyear;
	private Integer period;
	private BigDecimal beginQty = new BigDecimal(0);
	private BigDecimal beginAmt = new BigDecimal(0);
	private BigDecimal inQty = new BigDecimal(0);
	private BigDecimal inAmt = new BigDecimal(0);
	private BigDecimal outQty = new BigDecimal(0);
	private BigDecimal outAmt = new BigDecimal(0);
	private BigDecimal costPrice = new BigDecimal(0);
	private BigDecimal waitInQty = new BigDecimal(0);
	private BigDecimal waitOutQty = new BigDecimal(0);
	private Integer state = 0;
	private Product product;
	private InventoryAdd inventoryAdd;
	private ProductBatchNo batchNo;*/